/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2025. All rights reserved.
 * This source file is part of the Cangjie project, licensed under Apache-2.0
 * with Runtime Library Exception.
 * 
 * See https://cangjie-lang.cn/pages/LICENSE for license information.
 */

/*
  @Name:         13_01_02_02_a09_{{num}}

  @Assertion:    13.1.2.2(9)  As with the foreign functions, the parameters and
                 return types of other forms of CFunc must conform the CType
                 constraint, and named parameters and parameter default values
                 are not supported.

  @Description:  CFunc may use {{CJType}} as return type.

  @Mode:         run

  @Negative:     no

  @Structure:    single

  @Comment:      

*/

from utils import utils.assert.Assert

@c
func func_01(): {{CJType}} {
    {{CJVal}}
}

main() {
    var FPtr: CFunc<()->{{CJType}}> = func_01
    var Val = unsafe{ FPtr() }
    Assert.equals({{CJVal}}, Val)
}
